<template>
	<view class="mb">
	<m-tabbar native >
	    <template v-slot:tabbar_index_1> 
	        <view class="custom_style">
	            <view class="custom_style_icon">+</view>
	        </view>
	    </template>
	</m-tabbar>
	</view>	
</template>

<script>
	import commonMethod from '@/utils/commonMethod.js';
	export default {
		data(){
			return {
			}
		},
		methods: {
			TabNew(){
				if(this.$store.state.tabNew){
					this.$store.state.tabNew=false
				}else{
					this.$store.state.tabNew=true
				}
				uni.switchTab({
					url:'/pages/tabBar/index/index'
				})
			},

		},
		async onShow() {
			//判断是否登录
			this.register = await commonMethod.getUserLoginFlag();
			if (this.register) {
			  // 跳转登录
			  uni.redirectTo({
			    url: '/pages/account/login/login'
			  })
			  // return;
			}else{
				this.TabNew()
			}
		},
		async mounted(){
			
			
		}
		
	}
</script>

<style lang="scss" scoped>
.mb::v-deep{
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	// background-color: rgba(0,0,0,.5);
}
</style>
